<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("components4phpfull/jtsendemail.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Contact_Delete extends Page
{
       public $hiddenContact = null;
       function Contact_DeleteCreate($sender, $params)
       {
       $contact = $_GET['contact_num'];
       $company_id = $_GET['company_id'];
       $this->hiddenContact->setValue($contact);

       $result = mysql_query("delete from company_contact where contact_num='".$this->hiddenContact->getValue()."'")
       or die("SIRA TO EH PANO MALALMAN??? ".mysql_error());

       redirect('comp_contact_list.php?company_id='.$company_id);
       }

}

global $application;

global $Contact_Delete;

//Creates the form
$Contact_Delete=new Contact_Delete($application);

//Read from resource file
$Contact_Delete->loadResource(__FILE__);

//Shows the form
$Contact_Delete->show();

?>